.dropdown-menu {
  &:before, &:after {
    content: '';
    display: inline-block;
    position: absolute;
  }

  &:before {
    top: -$dropdown-arrow-outer-width;
    left: 0.75rem;

    border-left: $dropdown-arrow-width solid transparent;
    border-right: $dropdown-arrow-width solid transparent;
    border-bottom: $dropdown-arrow-width solid var(--#{$prefix}dropdown-border-color);
  }

  &:after {
    top: -$dropdown-arrow-width;
    left: 0.75rem;

    margin-left: -1px;
    margin-right: 0;

    border-left: $dropdown-arrow-outer-width solid transparent;
    border-right: $dropdown-arrow-outer-width solid transparent;
    border-bottom: $dropdown-arrow-outer-width solid var(--#{$prefix}dropdown-bg);
  }

  &.dropdown-menu-end {
    &:before {
      left: auto;
      right: 0.75rem;
    }

    &:after {
      left: auto;
      right: 0.75rem;

      margin-left: 0;
      margin-right: -1px;
    }
  }

  .dropup & {
    &:before {
      top: auto;
      bottom: -$dropdown-arrow-outer-width;

      border-bottom: 0;
      border-top: $dropdown-arrow-width solid var(--#{$prefix}dropdown-border-color);
    }

    &:after {
      top: auto;
      bottom: -$dropdown-arrow-width;

      border-bottom: 0;
      border-top: $dropdown-arrow-outer-width solid var(--bs-dropdown-bg);
    }
  }

  @include media-breakpoint-down(md) {
    --#{$prefix}dropdown-font-size: 0.75rem;
    --#{$prefix}dropdown-padding-y: 0.375rem;
    --#{$prefix}dropdown-item-padding-x: 0.75rem;
  }
}
